package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class UnionJoin implements JoinedTable {

    private int beginIndex;
    private int endIndex;
    private TableReference tableReference;
    private TablePrimary tablePrimary;

    public UnionJoin(TableReference tableReference,
                     TablePrimary tablePrimary) {
        this.beginIndex = tableReference.getBeginIndex();
        this.endIndex = tablePrimary.getEndIndex();
        this.tableReference = tableReference;
        this.tablePrimary = tablePrimary;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public TableReference getTableReference() {
        return tableReference;
    }

    public TablePrimary getTablePrimary() {
        return tablePrimary;
    }

}
